home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / Arkanoid Flash.swf / scripts / frame_31 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  981 b   |  39 lines

  1. i = "1";
  2. while(noOfF >= i)
  3. {
  4.    fast_y = getProperty("fast" add i, _Y);
  5.    fast_y += "6";
  6.    setProperty("fast" add i, _Y, fast_y);
  7.    if("390" < fast_y)
  8.    {
  9.       bat_x = getProperty("/bat", _X);
  10.       bat_left = bat_x - batWidth / "2";
  11.       bat_right = bat_x + batWidth / "2";
  12.       fast_x = getProperty("fast" add i, _X);
  13.       fast_left = fast_x - "10";
  14.       fast_right = fast_x + "10";
  15.       if(fast_left >= bat_left and bat_right >= fast_right)
  16.       {
  17.          tellTarget("/soundFX")
  18.          {
  19.             gotoAndStop("fast");
  20.             play();
  21.          }
  22.          trace("You\'ve just got FAST");
  23.          magnitude += "2";
  24.          speed_ind += "2";
  25.          timer = getTimer();
  26.          power_up = "fast";
  27.          call("reset_capsules");
  28.          removeMovieClip("fast" add i);
  29.          onscreen_F = "0";
  30.       }
  31.       else
  32.       {
  33.          removeMovieClip("fast" add i);
  34.          onscreen_F = "0";
  35.       }
  36.    }
  37.    i += "1";
  38. }
  39.